def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)
num = int(input('请输入一个正整数: '))
print('{} 的阶乘为：{}'.format(num, factorial(num)))